package com.jh.user.repository;

import com.jh.user.pojo.Province;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @author zhugu
 * @version 1.0
 * 2018/12/6 10:43
 */
@Repository
public interface ProvinceRepository extends JpaRepository<Province, Long>, JpaSpecificationExecutor<Province> {
    @Query("select p from Province p where p.province like :province%")
    Province queryByProvince(@Param("province") String province);
}
